

<?php 
if($p == "channeldetails"){
	if($id)
	$getdetails = getchanneldetailsu($id);
	
	?>
      <div class="inner">
                <div id="home">
    
    
   
  
                      <div class="article">
                                <h2>You are watching <?php echo $getdetails['u_stm'];?></h2>
                            </div>
  <div class="form">
<div class="row">	
<div class="playerhome">
   
	<?php
	ads($getdetails['u_stm'], 650,400,$getdetails['is_active_stm'], $getdetails['uid_stm'], 'play');
	
	
	?>
    
    <script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'f86cd6fc-6be3-4e06-a4b6-b952c2899cc3'});</script>

<div class="rightshare">
<span  class='st_twitter_vcount' displayText='Tweet'></span><span  class='st_email_vcount' displayText='Email'></span><span  class='st_facebook_vcount' displayText='Facebook'></span><span  class='st_sharethis_vcount' displayText='ShareThis'></span>
</div>
    </div>
</div></div>



<div class="row">

<div class="containert">


<h4>Embed Code</h4>


<div class="container-input"><div class="rightext">
<script>
function changeWidthHeight(w,h){
var ch = "<?php echo $getdetails['u_stm'];?>";
var objTA = document.getElementById('textAreaIdEmbed');
objTA.innerHTML = '<script>fid="'+ch+'"; v_width='+w+'; v_height='+h+';<\/script><script type="text\/javascript" src="<?php echo domain?>/player/embedPlayer.js"><\/script>';
} 
</script>
<div id="video-size"><b>Video Size</b><br>
			<input type="radio" onclick="changeWidthHeight(390, 240)" name="size">390x240		
			<input type="radio" onclick="changeWidthHeight(490, 300)" name="size">490x300		
			<input type="radio" checked="checked" onclick="changeWidthHeight(590, 360)" name="size">590x360		
			<input type="radio" onclick="changeWidthHeight(690, 420)" name="size">690x420
			</div>
<textarea id="textAreaIdEmbed" onclick="this.select()" class="inputreg2" rows="2" >
<script type="text/javascript"> fid="<?php echo $getdetails['u_stm'];?>"; v_width=400; v_height=290;</script><script type="text/javascript" src="<?php echo domain?>/player/embedPlayer.js"></script>
</textarea><br><br><b>Viewers Count</b><br>
<?php echo $getdetails['viewers'];?><br><br>
</div>
</div></div></div></div>
</div>
      <div class="clear"></div> <!-- .clear -->
</div></div>

<?php } ?>

<?php if ($p == 'register' || $p == ''){
	
	?>

        <div class="inner">
                <div id="home">
                    <div id="home-splash">
                      <div class="article">
                                <h2>Start broadcasting! Now just a click away!</h2>
                            </div>
                         <div class="article">
                                <p>Welcome to <?php sitename?> free streaming platform for everyone.</a>.</p>
                            </div>
                        </div>
                        <?php createchannel();?>
<form name="loginForm" id="LoginForm" method="post" action="">
                                    <div class="form">
                                        <div class="row">
                                            <div class="cell label">Channel Name</div>
                                            <div class="cell input"><input type="text" tabindex="1" name="streamname" class="mega email" id="Email"></div>
                                        </div> <!-- .row -->
                                        <div class="row">
                                            <div class="cell label">
                                                Domain Protect
                                                <span class="help forgot-password">
(e.g : www.mydomain.com or mydomain.com without http://)</span>
                                            </div>
                                            <div class="cell input"><input type="text" tabindex="2" placeholder="e.g. site1.com, site2.com" name="protect" class="mega" ></div>
                                        </div> <!-- .row -->
                                     
                                        <div class="row last">
                                            <div class="cell input float-right"><input name="createchannel" type="submit" tabindex="10" value="Start Broadcast"></div>
                                        </div> <!-- .row -->
                                    </div> <!-- .form -->
                            
                                </form>
                      
                    </div>
                </div>
                    <div class="clear"></div> <!-- .clear -->

                    </div> <!-- .inner -->
                </div> <!-- #BodyContent.structural.fixedWidth.standard -->
              


<?php }?>


<?php if ($p == 'contact-us'){
	
?>

<div class="inner">
                <div id="home">

    

    <div class="main">
    <div class="container-input">
    <?php sendcontact();?>
</div> <div class="container-input">
<form method="POST" action="">

<div class="left-text">Email:* </div>
<div class="right-text">  <input name="Email" type="text" size="55" class="inputreg">
 </div>
<div class="left-text">Comment:*</div>
<div class="right-text">   <textarea name="Comment" cols="55" rows="6"  class="inputreg"/></textarea>
 </div><div class="left-text">&nbsp; </div><div class="right-text">  
  <input type="submit" name="submit"  class="button" value="Send"> </div>
 
</form>

</div> 
<div style="float:left; width:100%; height:20px">&nbsp;</div></div><?php echo "</div></div>"; }?>


<?php if ($p == 'forgotpassword'){
?>
 <div class="wrap_left">
<ul id="page_subnav">

<?php loginleft('index.php?p=forgotpassword');?>
</ul></div>
    
    
    
    <div class="main">

<?php forgot();?>

<form action="" method="post">

<div class="left-text">Your Email</div>
<div class="right-input"><input type="text" class="inputreg" value="" name="email" id="your_email" /></div>

<div class="container-input">
<div class="login-left">&nbsp;</div><div class="login-right"><input type="submit" class="button" name="forgot" value="Email Password" /></div>
</div>


</form>




<?php }?>



<?php
 
if($p == 'c'){?>

        <div class="inner">
                <div id="home">

<?php
include_once(abspath."/content/config/$id.php");	
	
	echo "</div></div>";}
	
	
	?>
    	<?php 
if($p == "viewchannel"){?>
 <div class="inner">
                <div id="home">
    <div id="home-splash">
                      <div class="article">
                                <h2>Instructions to start streaming</h2>
                            </div>
                         <div class="article">
                                <p>Follow the below instructions carefully for a better stream quality.</p>
                            </div>
                        </div>

                                    <div class="form">
                                        <div class="row">
<?php if($id){ 	$details = getchanneldetails($id);?>



<h4>Stream a Channel</h4>

<div class="left-text-only">FMS URL Field: </div>
<div class="right-input-only"><b><?php echo livestream_s?>?p=<?php echo $details['p_stm'];?></b></div>
<div class="left-text-only">Stream Field: </div>
<div class="right-input-only"><b><?php echo $details['u_stm'];?></b></div>

<div class="left-text-only">Download Encoder: </div>
<div class="right-input-only"><b><a href="http://www.adobe.com/products/flashmediaserver/flashmediaencoder/"> Download Adobe Flash Media Live Encoder</a></b></div>



</div>


<div class="row">

<h4>Quick instructions to broadcast your channel</h4><br>


     <div class="containert">
1. Download the flash media encoder <a href="http://www.adobe.com/products/flashmediaserver/flashmediaencoder/">[FME]</a> and install<br>
2. Open FME and select "Stream to Flash Media Server"<br>
3. Paste "FMS URL Field :" in the "FMS URL:" input field<br>
4. Paste "Stream Field :" in the "Stream:" input field<br>
5. Click "Start" to begin your broadcast!
</div>
</div>




<div class="row">

<h4>Direct Link</h4>
     <div class="containert">
<div class="link"><a href="<?php echo domain."/?p=channeldetails&id=".$details['u_stm'];?>"><?php echo domain."/?p=channeldetails&id=".$details['u_stm'];?></a></div>
</div></div>


<div class="row last">
<h4>Embed Code</h4>

 <div class="containert">
<div class="embed">&lt;script type=&quot;text/javascript&quot;&gt; fid=&quot;<?php echo $details['u_stm'];?>&quot;; v_width=400; v_height=290;&lt;/script&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;<?php echo domain?>/player/embedPlayer.js&quot;&gt;&lt;/script&gt;</div>
</div>

</div></div></div>

   <div class="clear"></div> <!-- .clear -->

	
    <?php 
}


echo "</div></div>";}

?>
    
    
    
</div>

 <script type="text/javascript" src="<?php echo domain?>/includes/js/front-js.js"></script>
